import React from 'react'
import { StaticRouter } from 'react-router-dom'
import { Provider } from 'react-redux'

const render = ({ App, actions, routes }) => {
  const AppWrapper = props => (
    <StaticRouter location={props.url} context={props.context}>
      <Provider store={props.store}>
        <App />
      </Provider>
    </StaticRouter>
  )

  return {
    App: AppWrapper,
    actions,
    routes,
  }
}

export default render
